<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Hospital_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-hospital_id" data-rule="required" data-source="aa/hospital/index" class="form-control selectpage" name="row[hospital_id]" type="text" value="">
        </div>
    </div>
    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2">{:__('Code')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<input id="c-code" data-rule="required" class="form-control" name="row[code]" type="text">-->
        <!--</div>-->
    <!--</div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('科室类别')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sord_id" data-rule="required" data-source="aa/sort/index" class="form-control selectpage" name="row[sort_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Summary')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-summary" data-rule="required" class="form-control " rows="5" name="row[summary]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script src="/assets/js/jquery-1.8.3.min.js"></script>
<script>
    $('#c-name').focus(function () {

        var arr = $('#add-form').serializeArray()
        var id = arr[1]['value']
        $.ajax({
            type: "POST",//方法类型
            dataType: "json",//预期服务器返回的数据类型
            url: "/admin/index/secci" ,//url
            data: {id:id},
            success: function (data) {

            },
            error : function() {

            }
        })
    })
    $('#c-sord_id').focus(function () {

        var arr = $('#add-form').serializeArray()
        var id = arr[1]['value']
        $.ajax({
            type: "POST",//方法类型
            dataType: "json",//预期服务器返回的数据类型
            url: "/admin/index/secci" ,//url
            data: {id:id},
            success: function (data) {

            },
            error : function() {

            }
        })
    })

</script>
